#ifndef __BUTTON_H
#define __BUTTON_H
/* Private includes ----------------------------------------------------------*/
#include "main.h"
/* Private define ------------------------------------------------------------*/
#define BUTTON_INTERVAL          8
#define BUTTON_SET 	 		     1u

#define BUTTON_LOCK_RESET	     0u
#define BUTTON_LOCK_SET	 		 1u

#define BUTTON_FLAG_RESET	     0u
#define BUTTON_FLAG_SET	 		 1u

#define BUTTON1 	 		  button_ex
#define BUTTON2  		      button_up
#define BUTTON3  		      button_right
/* Private typedef -----------------------------------------------------------*/

typedef struct 
{
	uint8_t value;
	uint8_t lock;
	uint8_t cnt;
	uint8_t flag;
}button_device_s;


/* Private variables ---------------------------------------------------------*/
extern button_device_s button1;
extern button_device_s button2;
extern button_device_s button3;
/* Private function ----------------------------------------------------------*/

extern void button_scan(void);
extern void button_check(button_device_s* button_x);
extern void button_run(void);

#endif


